Skip to content

chore(tests): add Opensearch integration tests#24652

Open
tstenner wants to merge 11 commits into
vectordotdev:masterfrom
tstenner:feature/opensearch-integration
Open

chore(tests): add Opensearch integration tests#24652
tstenner wants to merge 11 commits into
vectordotdev:masterfrom
tstenner:feature/opensearch-integration

Conversation

@tstenner

Copy link
Copy Markdown

Summary

This PR adjusts the existing Elasticsearch integration test to also run the test against Opensearch 3.5.

As a very minor change it changes the automatic Elasticsearch version detection to detect Opensearch as version 7.

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

Overriding the Elasticsearch version to 7 is not needed any more for Opensearch.

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

References

Related: #17690 , #16761

@tstenner tstenner requested a review from a team as a code owner February 12, 2026 19:30
@github-actions github-actions Bot added the domain: sinks Anything related to the Vector's sinks label Feb 12, 2026
@github-actions

github-actions Bot commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@tstenner

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@tstenner tstenner force-pushed the feature/opensearch-integration branch 2 times, most recently from a298c6d to 22f4c6a Compare February 13, 2026 07:36
@tstenner tstenner force-pushed the feature/opensearch-integration branch from 22f4c6a to 1fb22c7 Compare March 12, 2026 09:01
@ts-ppi-1

Copy link
Copy Markdown

Rebased against master.

@pront

pront commented Mar 26, 2026

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1fb22c7764

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Makefile
Comment thread tests/integration/opensearch/config/test.yaml Outdated
@tstenner tstenner force-pushed the feature/opensearch-integration branch 2 times, most recently from 191e6ae to fd50c2f Compare March 27, 2026 07:19
@github-actions github-actions Bot added the domain: ci Anything related to Vector's CI environment label Mar 27, 2026
@pront

pront commented Apr 3, 2026

Copy link
Copy Markdown
Member

Hi @ts-ppi-1, please fix the merge conflicts and we will take another look at the PR. Thanks!

@tstenner tstenner force-pushed the feature/opensearch-integration branch from fd50c2f to b5555a4 Compare April 4, 2026 08:33

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b5555a40ce

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread tests/integration/opensearch/config/test.yaml
@tstenner

tstenner commented Apr 4, 2026

Copy link
Copy Markdown
Author

Looks like an editor autoformatted some YAML files in a recent commit.

I have rebased the changes to the new formatting.

Comment thread src/sinks/elasticsearch/common.rs
Comment thread tests/integration/opensearch/config/test.yaml
@tstenner tstenner force-pushed the feature/opensearch-integration branch from 7a9fd98 to 73aa987 Compare April 9, 2026 19:27
@tstenner

tstenner commented Apr 9, 2026

Copy link
Copy Markdown
Author

Rebased the branch and rebuilt the certificates because the azurite integration test also added new certificates with the same serial number.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 73aa987cb6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread Cargo.toml
Comment thread .github/workflows/integration.yml
@@ -0,0 +1,21 @@
features:
- es-integration-tests

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- es-integration-tests

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed because the integration tests are the es-integration-tests running against an opensearch instance instead of an elasticsearch instance

Comment thread Cargo.toml
}

#[cfg(feature = "aws-core")]
#[cfg_attr(feature = "opensearch-integration-tests", ignore)]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and below:

Suggested change
#[cfg_attr(feature = "opensearch-integration-tests", ignore)]

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opensearch is missing the AWS authentication so this test has to be skipped

ElasticsearchMode::DataStream => config
.data_stream
.as_ref()
.map(|ds| format!("logs-generic-{}", ds.namespace))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we write here eventually, can we delete my-template-* / my-stream-* ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd have to look into this. As of now, this is the smallest change I found back then that worked against both backends

/// Use the Elasticsearch 8.x API.
V8,
/// Use the Opensearch 3.x API
OS3,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This basically V7 so I think we can delete this and just update the V7 docs.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment, the OS3 code paths are the same as V7, but there it lays the groundwork to handle all minor differences (current and upcoming) and new functionality that does not warrant an entirely new sink.

let mut body = body.collect().await?.aggregate();
let body = body.copy_to_bytes(body.remaining());
let ResponsePayload { version } = serde_json::from_slice(&body)?;
if let Some(version) = version.as_ref()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we do this https://github.com/vectordotdev/vector/pull/24652/changes#r3073522268, then we can delete all changes in this file.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theoretically yes, but once we need special handling of Opensearch that does not yet warrant a separate sink we should have the groundwork ready.

@tstenner tstenner force-pushed the feature/opensearch-integration branch from 73aa987 to 3fa995b Compare April 20, 2026 17:21

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3fa995b816

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread tests/integration/opensearch/config/test.yaml
@tstenner tstenner force-pushed the feature/opensearch-integration branch from 3fa995b to 961f106 Compare April 20, 2026 17:36
@tstenner tstenner force-pushed the feature/opensearch-integration branch from 961f106 to 7054892 Compare June 3, 2026 11:19

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7054892205

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +509 to +511
data_stream: Some(DataStreamConfig {
namespace: index,
..Default::default()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Align the data stream name with the test setup

When the new OpenSearch suite runs insert_events_in_data_stream, this data_stream config makes the sink derive the target as logs-generic-{index}, while the setup just above still creates an index template matching my-*-* and a data stream named my-stream-{index}. OpenSearch data streams need a matching data-stream index template for the target name, so the bulk writes go to an unprepared logs-generic-* stream and the test fails instead of exercising the created stream.

Useful? React with 👍 / 👎.

Comment thread tests/integration/opensearch/config/compose.yaml
@tstenner tstenner force-pushed the feature/opensearch-integration branch 2 times, most recently from b2ee261 to 5d0adb2 Compare June 4, 2026 11:06

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5d0adb2cd9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/sinks/elasticsearch/mod.rs
@tstenner tstenner force-pushed the feature/opensearch-integration branch from 2892e6f to abd8ecf Compare June 19, 2026 08:48
@tstenner

Copy link
Copy Markdown
Author

Rebased against master

@datadog-vectordotdev

This comment has been minimized.

@tstenner tstenner requested a review from a team as a code owner June 25, 2026 14:54
@github-actions github-actions Bot added the domain: external docs Anything related to Vector's external, public documentation label Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: ci Anything related to Vector's CI environment domain: external docs Anything related to Vector's external, public documentation domain: sinks Anything related to the Vector's sinks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants